FROM alpine:latest
USER root
WORKDIR /openconnect
ADD entrypoint.sh /openconnect/
RUN chmod +x entrypoint.sh
RUN apk add openconnect oath-toolkit-oathtool iptables procps
RUN rm -f /etc/vpnc/vpnc-script \
    && wget https://gitlab.com/openconnect/vpnc-scripts/-/raw/master/vpnc-script -O /etc/vpnc/vpnc-script \
    && chmod +x /etc/vpnc/vpnc-script
ENTRYPOINT [ "/bin/sh", "entrypoint.sh" ]